#ifndef POJO_H
#define POJO_H
#include<vector>
#include<iostream>
class User
{
public:
    int id;
    std::string email;
    std::string password;

    User(){}
    User(std::string email,std::string password):email(email),password(password){}
};

/**
 * 类的属性默认值，为数据库的字段名，在此配置映射，后期可解耦到配置文件
 */
class Info {
public:
    std::string s_mac="s_mac";
    std::string d_mac="d_mac";
    std::string s_ip="s_ip";
    std::string d_ip="d_ip";
    std::string s_port="s_port";
    std::string d_port="d_port";
    std::string length="length";
    std::string time="time";
    std::string payload="payload";
    std::string protocol="protocol";
    std::string table_name="info";
    std::string columns;
    std::vector<std::string> props;

public:
    Info() {columns="("+d_mac+","+s_mac+","+s_ip+","+d_ip+","+s_port+","+d_port+","+length+","+time+","+payload+","+protocol+")";}
    Info(const std::string &s_mac,const std::string &d_mac ,const std::string& s_ip, const std::string& d_ip, std::string s_port, std::string d_port, std::string length,
         const std::string& time, const std::string& payload, const std::string& protocol)
        :s_mac(s_mac) ,d_mac(d_mac),s_ip(s_ip), d_ip(d_ip), s_port(s_port), d_port(d_port), length(length),
          time(time), payload(payload), protocol(protocol) {

        props.push_back(s_mac);
        props.push_back(d_mac);
        props.push_back(s_ip);
        props.push_back(d_ip);
        props.push_back(s_port);
        props.push_back(d_port);
        props.push_back(length);
        props.push_back(time);
        props.push_back(payload);
        props.push_back(protocol);

    }

};


#endif // POJO_H
